<!--#INCLUDE FILE="programmer.inc"-->
<!--#INCLUDE FILE="conn.asp"-->
<!-- #include file="function_charCode.asp" -->
<!-- #include file="function.asp" -->
<!-- #include file="comSub.asp" -->
<script src=inc/js1.js></script>
<script src=inc/js2.js></script>

<%
call stylefile()
%>
<!-- #include file="FriendOE.asp" -->

<%
call UserNothing()
call onlineuser()
call bbsopen()
call newmessage()

Dim keyword2
keyword2=Trim(request("keyword"))
keyword2=Replace(Replace(keyword2,"<",""),">","")

%>

<HTML>
<HEAD>
<%call MetaKeyw()%>
<%call MetaDesc()%>
<TITLE>̳ҳ</TITLE>
</HEAD>
<BODY topmargin=0>

<!--#INCLUDE FILE="sidemenu.asp"-->

<table border=0 width=100% cellspacing=0 cellpadding=1>
         <tr>
                  <td width=100 height="67" bgcolor=greenyellow>
                          <img border="0" src="images/tushan2.gif" width="100" height="65" align=middle vspace=0 hspace=0>
                  </td>
                  <td rowspan=2 bgcolor=dodgerblue>
                           <a href=advertisement/indexad/top.htm target="new">
                           <%
                                 set objad=server.createobject("mswc.adrotator")
                                 response.write objad.getadvertisement("advertisement/indexad/topadrot.txt")
                                 set objad=nothing
                            %>
                           </a>
                  </td>
         </tr>
         <tr>
                  <td height="6" bgcolor=dodgerblue>
                  </td>
         </tr>
</table>
<CENTER>
<table border=0 width=970 cellspacing=0 cellpadding=0 bordercolordark='#000000' bordercolorlight='#000000'>
          <tr>
                  <td align=right>
                            <span style="font-size:14"><b><%=session("tslt_username")%></b></span>
                            <span style="font-size:20">
                            <%if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then%>
                                    <A class=td8 id="TopRight_mune1" onmouseover="ShowDivMenu(1)" href="admin_index/ad_index.asp"></A>
                            <%end if%>
                            <%if session("tslt_username")<>"" then%>
                                    <%if session("tslt_openFrameChat")=True then%>
                                               <A class=a2 href="javascript:parent.bottomFrame.location.href='chat/exit.asp';parent.location.href='logout.asp';"><font color=red>ע¼</font></A>
                                    <%else%>
                                               <A class=a2 href="logout.asp"><font color=red>ע¼</font></A>
                                    <%end if%>
                            <%else%>
                                    <A class=a2 href="userlogin.asp">¼</A>&nbsp;<A class=a2 href="zc.asp">ע</A>
                            <%end if%>
                            <%if request("jinghua")="" then%>
                                    <img src="images/jh.gif" width="17" height="17" border=0><a class=a2 href=index.asp?jinghua=true title=""></a>
                            <%end if%>
                            <A class=td8 id="TopRight_mune2" onmouseover="ShowDivMenu(2)"">ܲ˵</A>
                            <%if session("tslt_username")<>"" then%>
                                       <A title="´" target="_blank" href=sitenote.asp><img src="images/zndx.gif" width="17" height="17" border=0></A><A class=a2 href=sitenote.asp>վڶ</A>
                                       <%if request("article")="" then%> 
                                                    <A title="´" target="_blank" href=collectionA.asp><img src="images/scj.gif" width="17" height="17" border=0></A><A class=a2 href=collectionA.asp title="ղ">ղؼ</A>
                                       <%end if%>
                           <%end if%>
                           </span>
                            <DIV id="div_mune1" align="right" style="display:none;" onmouseover="ShowDivMenu(1)" onmouseout="HideDivMenu(1)">
                                    <table class="td8" border=0 cellspacing=0 cellpadding=0 bordercolordark='#000000' bordercolorlight='#000000'>
                                             <tr>
                                                     <td class=font3>
                                                              <%if request("secret")="" then%>
                                                                      <img src="images/qiaoqiaohua.gif" width="17" height="17" border=0><a class=a4 href=index.asp?secret=true><font color=bbbbbb>Ļ</font></a>
                                                              <%end if%>
                                                              <%if request("lockarticle")="" then%>
                                                                      <img src="images/lock.gif" width="17" height="17" border=0><a class=a4 href=index.asp?lockarticle=true title=",ͨûȨ"></a>
                                                              <%end if%> 
                                                              <%if request("transmit")="" then%>
                                                                      <img src="images/transmit.gif" border=0><a class=a4 href=index.asp?transmit=true title="ת">ת</a>
                                                              <%end if%>
                                                              <%if request("jinghua")="" then%>
                                                                      <img src="images/jh.gif" width="17" height="17" border=0><a class=a4 href=index.asp?jinghua=true title=""></a>
                                                              <%end if%>
                                                              <%if request("dustbin")="" then%>
                                                                      <img src="images/dustbin.gif" width="17" height="17" border=0><a class=a4 href=index.asp?dustbin=true title=""></a>
                                                              <%end if%>
				                                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;							                                  
                                                              <%if request("secret")<>"" or request("lockarticle")<>"" or request("transmit")<>"" then%>
				                                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                              <%end if%>
			                                         </td>
                                             </tr>
                                    </table>
                            </DIV>
                            <DIV id="div_mune2" align="right" style="display:none;" onmouseover="ShowDivMenu(2)" onmouseout="HideDivMenu(2)">
                                 <table class="td8" border="0" cellspacing="0" cellpadding="0" bordercolordark='#000000' bordercolorlight='#000000'>
                                     <tr>
                                          <td valign='baseline' class=font3>
			                                  <img src="images/wyl.gif" width="17" height="17" border=0><A class=a4 target="_blank" href="wyl/wy.asp">¼</A>
				                              <%If session("tslt_openFrameChat")="" then%>
					                               <img src="images/lts.gif" width="17" height="17" border=0><A class=a4 href="index_Frame.asp"></A>
                                              <%else%>
					                               <img src="images/lts.gif" width="17" height="17" border=0><A class=a4 href="javascript:parent.bottomFrame.location.href='chat/exit.asp';parent.location.href=self.location.href;">ر</A>
                                              <%End if%>
			                                       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		                                  </td>
                                     </tr>
                                 </table>
                            </DIV>
	              </td>
          </tr>
          <tr>
                  <td align="left" onmouseout="HideDivMenu2(1)" onmouseout="HideDivMenu2(2)">
                            <span style="font-size:15">
                            <%if request("keyword")<>"" and request("sel1")<>"" then%>
                                   <img src=images/home.gif><a class=a1 href=index.asp>̳ҳ</a>&nbsp;<b></b>&nbsp;
                            <%elseif request("lockarticle")<>"" then%>
                                   <%if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then%>
                                          <img src=images/home.gif><a class=a1 href=index.asp>̳ҳ</a>&nbsp;<b></b>&nbsp;<img src="images/lock.gif" width="17" height="17" border=0>
                                   <%end if%>
                            <%elseif request("transmit")<>"" then%>
                                   <%if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then%>
                                          <img src=images/home.gif> <a class=a1 href=index.asp>̳ҳ</a>&nbsp;<b></b>&nbsp;<img src="images/transmit.gif" width="17" height="17" border=0>ת
                                   <%end if%>
                            <%elseif request("jinghua")="true" then%>
                                   <img src=images/home.gif><a class=a1 href=index.asp >̳ҳ</a>&nbsp;<b></b>&nbsp;<img src="images/jh.gif" width="17" height="17" border=0></FONT>
                            <%elseif request("secret")<>"" then%>
                                   <img src=images/home.gif><a class=a1 href=index.asp>̳ҳ</a>&nbsp;<b></b>&nbsp;<img src="images/qiaoqiaohua.gif" width="17" height="17" border=0><font color=bbbbbb>Ļ</font>
                            <%elseif request("dustbin")<>"" then%>
                                   <img src=images/dustbin.gif><a class=a1 href=index.asp>̳ҳ</a>&nbsp;<b></b>&nbsp;<img src="images/dustbin.gif" width="17" height="17" border=0>
                            <%end if%>
                            </span>
                  </td>
          </tr>
</table>
<hr width=955>
<%
call MYbulletin()

If session("tslt_useridentity")=1 Or session("tslt_useridentity")=2 Then
    Call setupC()
End If 

dim Communityrs
dim Communitysql
if session("tslt_useridentity")=1 or session("tslt_useridentity")=2 then
       Communitysql="select * from community order by CommunitySort asc"
Else
    If session("tslt_useridentity")=0 And authUser()=False Then
        Communitysql="select * from community where allAAH=false and autSelBoard=false and AllHiddBoard=false and AllAutSelAndHidd=false and CommunityHidden=false order by CommunitySort asc"
    ElseIf authUser() Then 
        Communitysql="select * from community where autSelBoard=false and AllHiddBoard=false and AllAutSelAndHidd=false and CommunityHidden=false order by CommunitySort asc"
    Else 
        Communitysql="select * from community where AllHiddBoard=false and CommunityHidden=false order by CommunitySort asc"
	End If 
end if
set Communityrs=conn.execute(Communitysql)
       if Communityrs.eof then response.write "<SCRIPT language=Javascript>passwords(promptInfo_index(0))</SCRIPT>"
       do while not Communityrs.eof
%>
             <table class=border2 border='0' width=950 cellspacing='0' cellpadding='0'>
             <tr>
                    <td>
                              <table class=border2 border='0' width=950 cellspacing='2' cellpadding='2'>
                              <tr height="35" class=tdreply>
                                    <td>
                                           <img src="images/minus.gif" id="I_Tag<%=Communityrs("id")%>" style="cursor:hand;" onclick="turnit(I_<%=Communityrs("id")%>,I_Tag<%=Communityrs("id")%>);">
                                           <b>
                                            &nbsp;&nbsp;<a class=a2 href="community.asp?Communityid=<%=Communityrs("id")%>" title="룺<%=Communityrs("CommunityName")%>"><%=Communityrs("CommunityName")%></a>
                                            <%if Communityrs("CommunityHidden") then response.write "<font color=red>()</font>" end if%>
                                            </b>
                                    </td>
                             </tr>
                             </table>
                    </td>
             </tr>
             <tr id="I_<%=Communityrs("id")%>">
                    <td>
                           <table class=border2 border='0' width=950 cellspacing='1' cellpadding='1'>
                           <tr>
                                 <td>
<%
                                 dim rs
                                 dim sql
                                 if session("tslt_useridentity")=1 or session("tslt_useridentity")=2 then
                                        sql="select * from board where Communityid="&Communityrs("id")&" order by boardsort asc"
								 ElseIf session("tslt_useridentity")=3 Then
								        sql="select * from board where boardhidden=false and Communityid="&Communityrs("id")&" order by boardsort asc"
								 ElseIf authUser() Then 
                                        sql="select * from board where autSel=false and boardhidden=false and Communityid="&Communityrs("id")&" order by boardsort asc"
                                 else
                                        sql="select * from board WHERE autSel=false and authentication=false and boardhidden=false and Communityid="&Communityrs("id")&" order by boardsort asc"
								 end if
                                 set rs=conn.execute(sql)
                                       if rs.eof then response.write "<SCRIPT language=Javascript>passwords(promptInfo_index(1))</SCRIPT>"
                                      do while not rs.eof
                                         if request("keyword")<>"" and request("sel1")<>"" or request("secret")<>"" or request("lockarticle")<>"" or request("transmit")<>"" or request("jinghua")<>"" or request("dustbin")<>"" then
%>
                                                 <CENTER>
                                                 <table width=930 border="0" cellpadding="0" cellspacing="0">
                                                 <tr>
                                                        <td align="left" valign="top" width=50>
                                                              <img src="style/<%=session("tslt_stylefolder")%>/shutiao.gif" width=50 oncontextmenu="return false">
                                                        </td>
                                                        <td valign="top" width="440">
                                                              <span style="position: absolute; z-index: -1"><img src="style/<%=session("tslt_stylefolder")%>/focus_j2.gif" height=30 width=440></span>
                                                              <p style="font-family:Ĳ;font-size:30"><%=rs("boardname")%></p>
                                                        <td valign="top" width="440">
                                                              <span style="position: absolute; z-index: -1"><img src="style/<%=session("tslt_stylefolder")%>/focus_j2.gif" height=30 width=440></span>
                                                              <p align=right style="font-family:;font-size:25">
<%
                                                              call boardmanageuser(rs("boardid"))
			        If isCEBM() And boardmanageuser_yes(rs("boardid")) Then  Response.write "<font color='red'>Ƹ</font>"
%>
                                                              </p>
                                                        </td>
                                                 </tr>
                                                 </table>
                                          <%end if%>

                                          <table width="100%" border="0" cellspacing='0' cellpadding='0'>
                                                 <tr>
                                                        <td width="25%" style="word-break:break-all">
                                                                <%if not rs("boardid")="" then %>
                                                                         <%if rs("boardimg")="" then%>
                                                                               &nbsp;&nbsp;<a class=a2 href="board.asp?boardid=<%=rs("boardid")%>&boardname=<%=rs("boardname")%>" title="飺<%=rs("boardname")%>"><font size=5 face="" color=<%=rs("wordcolor")%>><%=rs("boardname")%></font></a>
                                                                         <%else%>
                                                                               &nbsp;&nbsp;<a href="board.asp?boardid=<%=rs("boardid")%>&boardname=<%=rs("boardname")%>"><img align=absmiddle name="bdimg<%=boardid%>" id="bdimg<%=rs("boardid")%>" src="<%=rs("boardimg")%>" width=160 height=32 border="0" hspace=1 vspace=1 alt="飺<%=rs("boardname")%>"></a>
                                                                         <%end if%>
                                                                <%end if %>
                                                        </td>
                                                        <td>
                                                                <font size=2>
                                                                <img src="images/shuye2.gif" align="absbottom" width=30 height=15>
                                                                <%if rs("boardhidden") then response.write "<font color=red>(ذ)</font>" end if%>
                                                                <%if rs("boardreadonly") then response.write "<font color=red>(ֻ)</font>" end if%>
                                                                <%if rs("authentication") And rs("autSel")=False then response.write "<font color=red>(֤)</font>" end if%>
                                                                <%if rs("autSel") then response.write "<font color=red>(ר)</font>" end if%>
                                                                <%=rs("boarddetail")%>
																<br>
																<span style="font-size:12">
                                                                [
                                                                /ظ<%=boardAT(rs("boardid"))%>/<%=boardRAT(rs("boardid"))%>&nbsp;&nbsp;&nbsp;
                                                                ռÿռ䣺<%=boardARSize(rs("boardid"))%>&nbsp;&nbsp;&nbsp;
                                                                <a href="board.asp?boardid=<%=rs("boardid")%>&boardname=<%=rs("boardname")%>">&nbsp;<img src="images/go_movie.gif" border="0"></a>
                                                                ]
																</span>
                                                                </font>
                                                        </td>
                                                 </tr>
                                          </table>
										  <!-- <hr style="height:1;" class=h1> -->
                                          <table class=border6 width="100%" border="1" cellspacing='0' cellpadding='0'>
                                                 <tr>
                                                        <td>
                                                        </td>
                                                 <tr>
                                          </table>
<%
                                          if indexshowlistok()<>0 then
                                             if request("keyword")<>"" and request("sel1")<>"" or request("secret")<>"" or request("lockarticle")<>"" or request("transmit")<>"" or request("jinghua")<>"" or request("dustbin")<>"" then
%>
                                                         <form action="progress.asp" method="post" id="form2" name=fformprogress>
                                                         <%if request("Page")<>"" then%>
                                                                 <input type="hidden" name="indexpagehidden" value=<%=request("Page")%>>
                                                         <%else%>
                                                                 <input type="hidden" name="indexpagehidden" value=0>
                                                         <%end if%>
                                                         <!--ؼ    -->
                                                         <input type="hidden" name="indexlockarticlehidden" value=<%=request("lockarticle")%>>
                                                         <input type="hidden" name="indexsecrethidden" value=<%=request("secret")%>>
                                                         <input type="hidden" name="indexkeywordhidden" value="<%=keyword2%>">
                                                         <input type="hidden" name="indexjinghuahidden" value=<%=request("jinghua")%>>
                                                         <input type="hidden" name="indextransmithidden" value=<%=request("transmit")%>>
                                                         <input type="hidden" name="indexsel1hidden" value=<%=request("sel1")%>>
                                                         <input type="hidden" name="indexHidden_dustbin" value=<%=request("dustbin")%>>

                                                         <table align=center width=900 border="0" cellspacing="1" cellpadding="0" >
                                                                <tr>
                                                                       <td align="center" height="15" colspan="3"><font color="#FF0000">&nbsp;&nbsp;&nbsp; </font></td>
                                                                       <td align="center" height="15" width="11%"><font color="#FF0000"></font></td>
                                                                       <td align="center" height="15" width="8%"><font color="#FF0000">С</font></td>
                                                                       <td align="center" height="15" width="11%"><font color="#FF0000">ظ/</font></td>
                                                                       <td align="center" height="15" width="24%"><font color="#FF0000"></font></td>
                                                                       <%if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then%>
                                                                                <td align="center" height="15" width="5%" bordercolordark="#C0C0C0"><font color="#FF0000"></font></td>
                                                                       <%end if%>
                                                                </tr>
<% 
                                                             if Request("Page")="" or Request("Page")=0 or Request("Page")=1 Then
                                                                Dim objRS
                                                                Dim strSQL
                                                                strSQL = "SELECT * FROM article where adminindex=true Order By lastReplyTime DESc"
                                                                Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                objRS.Open strSQL, Conn, 1, 1
                                                                        if objRS.recordcount<>0 then
                                                                              For I = 1 To objRS.recordcount
                                                                                     Response.Write "<TR height='20' bgcolor=#f7f6f6 onmouseover=sbar(this) onmouseout=cbar(this)>"
                                                                                     call ArticleListField()
                                                                                     objRS.MoveNext
                                                                                     If objRS.EOF Then Exit For
                                                                               Next
                                                                        end if
                                                                objRS.close 
                                                                Set objRS = Nothing

                                                                strSQL = "SELECT * FROM article where Communityid="&rs("Communityid")&" and topfirst=true Order By lastReplyTime DESc"
                                                                Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                objRS.Open strSQL, Conn, 1, 1
                                                                        if objRS.recordcount<>0 then
                                                                              For I = 1 To objRS.recordcount
                                                                                     Response.Write "<TR height='20' bgcolor=#f7f6f6 onmouseover=sbar(this) onmouseout=cbar(this)>"
                                                                                     call ArticleListField()
                                                                                     objRS.MoveNext
                                                                                     If objRS.EOF Then Exit For
                                                                               Next
                                                                        end if
                                                                objRS.close 
                                                                Set objRS = Nothing

                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and top1=true Order By lastReplyTime DESc"
                                                                 Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                 objRS.Open strSQL, Conn, 1, 1
                                                                        if objRS.recordcount<>0 then
                                                                               For I = 1 To objRS.recordcount
                                                                                      Response.Write "<TR height='20' bgcolor=#f7f6f6 onmouseover=sbar(this) onmouseout=cbar(this)>"
                                                                                      call ArticleListField()
                                                                                      objRS.MoveNext
                                                                                       If objRS.EOF Then Exit For
                                                                                Next
                                                                         end if
                                                                 objRS.close 
                                                                 Set objRS = Nothing

                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and top_temp=true and CDate(tempTopDate)>='"&(Date-0)&"' Order By tempTopTime ASC"
						                                         Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                 objRS.Open strSQL,Conn,1,1
                                                                    if objRS.recordcount<>0 then
                                                                       For I = (TTCount()+1) To objRS.recordcount
						                                                   conn.execute("update article set top_temp=false where ID="&objRS("ID"))
                                                                           objRS.MoveNext
                                                                           If objRS.EOF Then Exit For
                                                                        Next
                                                                    end if
                                                                 objRS.close 
                                                                 Set objRS = Nothing

                                                                 strSQL = "SELECT top " &TTCount()& " * FROM article where boardid="&rs("boardid")&" and top_temp=true and CDate(tempTopDate)>='"&(Date-0)&"' Order By tempTopTime DESC"
																 Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                 objRS.Open strSQL, Conn, 1,1
                                                                    if objRS.recordcount<>0 then
                                                                        For I = 1 To TTCount()
                                                                            Response.Write "<TR height='20' bgcolor=#f7f6f6 onmouseover=sbar(this) onmouseout=cbar(this)>"
                                                                            call ArticleListField()
                                                                            objRS.MoveNext
                                                                            If objRS.EOF Then Exit For
                                                                         Next
                                                                     end if
                                                                 objRS.close 
                                                                 Set objRS = Nothing

                                                                strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and CDate(tempTopDate)<'"&(Date-0)&"'"
						                                        Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                objRS.Open strSQL,Conn,1,1
                                                                       if objRS.recordcount<>0 then
                                                                       For i = 1 To objRS.recordcount
						                                                   conn.execute("update article set top_temp=false where ID="&objRS("ID"))
                                                                           objRS.MoveNext
                                                                           If objRS.EOF Then Exit For
                                                                        Next
                                                                    end if
                                                                objRS.close 
                                                                Set objRS = Nothing
                                                             End If

                                                                 If (session("tslt_useridentity")=1 Or session("tslt_useridentity")=2) Then
                                                                     if keyword2<>"" then
                                                                         sel1=request("sel1")
                                                                         if sel1="" then
                                                                                strSQL = "SELECT * FROM article where (user like '%"& keyword2 &"%') and boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By lastReplyTime DESc"
                                                                         elseif sel1="" then
                                                                                strSQL = "SELECT * FROM article where " &(resArrKeyword(sel1,keyword2))& " and boardid="&rs("boardid")&"and topfirst=false and top1=false and adminindex=false and top_temp=false Order By lastReplyTime DESc"
																		 elseif sel1="" then
																				strSQL = "SELECT * FROM article where " &(resArrKeyword(sel1,keyword2))& " and boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By lastReplyTime DESc"
                                                                         elseif sel1="" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&"e and topfirst=false and top1=false and adminindex=false and top_temp=false Order By ReadCount DESc"
                                                                         elseif sel1="С" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By contentsize DESc"
                                                                         elseif sel1="С" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By AllReplySize DESc"
                                                                         else
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By lastReplyTime DESc"
                                                                         end if
                                                                     elseif request("jinghua")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and jinghua=true Order By lastReplyTime DESc"
                                                                     elseif request("lockarticle")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=true Order By lastReplyTime DESc"
                                                                     elseif request("secret")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and secret=true Order By lastReplyTime DESc"
                                                                     elseif request("transmit")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and transmit=true Order By lastReplyTime DESc"
                                                                     elseif request("dustbin")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and dustbin=true Order By lastReplyTime DESc"
                                                                     Else
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and topfirst=false and top1=false and adminindex=false and top_temp=false Order By lastReplyTime DESc"
																     End If
                                                                 Else
                                                                     if keyword2<>"" then
                                                                         sel1=request("sel1")
                                                                         if sel1="" then
                                                                                strSQL = "SELECT * FROM article where (user like '%"& keyword2 &"%') and boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By lastReplyTime DESc"
                                                                         elseif sel1="" then
                                                                                strSQL = "SELECT * FROM article where " &(resArrKeyword(sel1,keyword2))& " and boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By lastReplyTime DESc"
                                                                         elseif sel1="" then
                                                                                strSQL = "SELECT * FROM article where " &(resArrKeyword(sel1,keyword2))& " and boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By lastReplyTime DESc"
                                                                         elseif sel1="" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By ReadCount DESc"
                                                                         elseif sel1="С" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By contentsize DESc"
                                                                         elseif sel1="С" then
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By AllReplySize DESc"
                                                                         else
                                                                                 strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By lastReplyTime DESc"
                                                                         end if
                                                                     elseif request("jinghua")<>"" then 
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and jinghua=true Order By lastReplyTime DESc"
                                                                     Else
                                                                         strSQL = "SELECT * FROM article where boardid="&rs("boardid")&" and lockarticle=false and topfirst=false and top1=false and adminindex=false and top_temp=false and dustbin=false Order By lastReplyTime DESc"
																     End If
                                                                 End If 
                                                                 Set objRS = Server.CreateObject("ADODB.Recordset")
                                                                 objRS.Open strSQL, Conn, 1, 1
                                                                        If objRS.Eof And objRS.Bof Then
                                                                              if keyword2<>"" Then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(2))</SCRIPT>"
                                                                              elseif request("jinghua")<>"" then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(3))</SCRIPT>" 
                                                                              elseif request("lockarticle")<>"" then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(4))</SCRIPT>"
                                                                              elseif request("secret")<>"" then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(5))</SCRIPT>"
                                                                              elseif request("transmit")<>"" then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(6))</SCRIPT>" 
                                                                              elseif request("dustbin")<>"" then
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(11))</SCRIPT>" 
                                                                              else
                                                                                     Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(7))</SCRIPT>"
                                                                              end if
                                                                        end if

                                                                        dim RowCount,totalPage,totalRecordcount
                                                                                if NOT (objrs.EOF And objrs.BOF) then
                                                                               objrs.pagesize=indexshowlistok()
                                                                               RowCount=objrs.PageSize
                                                                               totalPage=objrs.pagecount
                                                                               objRS.AbsolutePage=REQUEST("Page")
                                                                               totalRecordcount=objrs.recordcount
                                                                        end if

                                                                        DO WHILE NOT objrs.EOF AND RowCount>0
                                                                               RowCount = RowCount - 1
                                                                               Response.Write "<TR height='20' class=td1 onmouseover=sbar(this) onmouseout=cbar(this)>"
                                                                               call ArticleListField() 
                                                                               objrs.MoveNext 
                                                                        Loop
                                                                        Response.Write "</TABLE>"
                                                                 objRS.close 
                                                                 Set objRS = Nothing
%>
                                                                 <%if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then%>
                                                                          <div align="right">
                                                                          <select name=act class=input2>
                                                                                 <option value="0"></option>
                                                                                 <option value="1">ɾ</option>
                                                                                 <option value="2">Ϊ</option>        
                                                                                 <option value="3">ȡ</option>
                                                                                 <option value="4">̶</option>
                                                                                 <option value="5">ȡ̶</option>
                                                                                 <option value="6"></option>  
                                                                                 <option value="7">ȡ</option>
                                                                                 <option value="8">תԱ</option>
                                                                                 <option value="9">ȡת</option>
                                                                                 <option value="15">̶</option>
                                                                                 <option value="16">ȡ̶</option>
                                                                                 <option value="17">̶ܹ</option>
                                                                                 <option value="18">ȡ̶ܹ</option>
                                                                                 <option value="19">лԭ</option>
                                                                                 <option value="20">ɾ</option>
                                                                          </select>
                                                                          <input name="goto" type=submit class=input3 id="goto2" value="ȷ">&nbsp;&nbsp;&nbsp;&nbsp;
                                                                          </div>
                                                                 <%end if%>
                                                         </form>
                                                         <%call pages()%>
                                                 <br><br>
                                                 <%' end if%>
<%
                                             end if
                                          end If

                                          rs.movenext
                                     loop
                                 rs.close
                                 set rs=nothing 
%>
                                 </td>
                          </tr>
                          </table>
                    </td>
             </tr>
             </table>
             <br>
<%
             Communityrs.movenext
      loop
Communityrs.close
set Communityrs=nothing 
%>

<br>
<table border=0 cellspacing=0 cellpadding=2 align=center width=500>
       <form name=indexsearch action=index.asp method=post>
       <tr bordercolor=#0099CC align=center>
           <td bgcolor=LightBlue width=83%><font color=#000070>ؼ:</font>
               <input type=text size=15 name=keyword maxlength=50 value="<%=keyword2%>">
               <SELECT name=sel1>
		               <OPTION></OPTION>
		               <OPTION></OPTION>
		               <OPTION></OPTION>
		               <OPTION></OPTION>
		               <OPTION></OPTION>
		               <OPTION>С</OPTION>
		               <OPTION>С</OPTION>
		               <OPTION>ȫ</OPTION>
               </SELECT>
               <SCRIPT for=sel1 event=onclick language="JavaScript">
                       if (this.selectedIndex==4)
                       {
                           keyword.value=this.options(this.selectedIndex).text;
                       }
                       if (this.selectedIndex==5)
                       {
                           keyword.value=this.options(this.selectedIndex).text;
                       }
                       if (this.selectedIndex==6)
                       {
                           keyword.value=this.options(this.selectedIndex).text;
                       }
                       if (this.selectedIndex==7)
                       {
                           keyword.value=this.options(this.selectedIndex).text;
                       }
               </SCRIPT>
               <input type=submit class=input3 height=18 width=39  name=b2 alt= value=>
           </td>
           <td>&nbsp;<a class=a1 href=javascript:history.go(-1)><b>ǰҳ</b></a></td>
       </tr>
       </form>
</table>

<%
If DemoLinkYesNo() Then 
    Call demoLink()
End If 
%>

<table align=center width="100%">
       <tr><td> 
                     <!--#INCLUDE file="bottom.asp"-->
       </td></tr>
</table> 

<%Call delNewSitenote()%>

</BODY>
</HTML>

<%
Call conn_Nothing()

sub UserNothing()
    dim Sql,Rs
    Sql="select ID from ts_userinfo"
    Set Rs=Conn.Execute(SQL)
           if Rs.eof And Rs.bof then session("tslt_username")=""
    Rs.close
    set Rs=nothing
end sub

sub bbsopen()
     dim rs,sql
     sql="select bbsopen from option1"
     set rs=conn.execute(sql)
	   Dim cbi
       cbi=rs("bbsopen")
       if cbi<>"" then
            Response.write"<BODY background=images/admin_bg_1.gif>"
            Response.write"<br><br><br><br><br><b><center><table border=0 width='70%'><tr><td><img src=images/tushan2.gif align=middle width=100 height=50><font face= size=4 color=#000070>"&cbi&"</font></td></tr></table></b></center>"
            if session("tslt_useridentity")=1 or session("tslt_useridentity")=2 then
                   Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(8))</SCRIPT>"
                   Response.Write "<SCRIPT language=Javascript>passwords(promptInfo_index(9))</SCRIPT>"
            end if
            Response.write"<center><table border=1><form action=userlogin.asp method=post>"
            Response.write"<input type=hidden name=IALHidden value=ok>"
            Response.write"<tr><td>û<input type=text name=username></td></tr>"
            Response.write"<tr><td>&nbsp;&nbsp;룺<input type=password name=password></td></tr>"
            Response.write"<tr><td align=center><input type=submit value=ȷ></td></tr>"
            Response.write"</form></table></center>"
            Response.write"</BODY>"
            Response.End
      end if
       rs.close
      Set  rs = Nothing
end sub

Function indexshowlistok()
           dim strSQL,objRS
           strSQL = "SELECT * FROM option1 Order By id DESc"
           Set objRS = Server.CreateObject("ADODB.Recordset")
           objRS.Open strSQL, Conn
                    indexshowlistok2 = objRS("indexshowlist")
           objRS.close
           set objRS=nothing
           indexshowlistok = indexshowlistok2
End Function

sub pages()
         dim keyword2
         keyword2=trim(request("keyword"))
        dim Page      
        Page= Request("Page")
        if Page="" or Page=0 then
                 page=1
        else
                 page=cint(request("page"))
        end if
       if totalRecordcount<>0 Then
            dim currid1,currid2
            if totalPage>=10 then 
                 if Page mod 10=0 then
                      currid1=Page
                      currid2=Page-9
                 else
                      if totalPage mod 10=0 then 
                            currid1=int(Page/10)*10+10
                      else 
                            if int(Page/10)=int(totalPage/10) then currid1=(totalPage/10)*10 else currid=int(Page/10)*10+10
                      end if
                      currid2=int(Page/10)*10+1
                 end if
            else 
                 currid1=totalPage mod 10
                 currid2=int(totalPage/10)*10+1
            end if
%>
            <table align=left>
                 <tr><td>
<% 
                      if totalPage>1 Then
                           If Page=totalPage or Page<>1 Then 
                                 dim PrwePage
                                 PrwePage=Page-1
%>
                                 <A class=a1 HREF="index.asp?Page=<%=PrwePage%>&keyword=<%=keyword2%>&jinghua=<%=request("jinghua")%>&lockarticle=<%=request("lockarticle")%>&secret=<%=request("secret")%>&transmit=<%=request("transmit")%>&sel1=<%=request("sel1")%>&dustbin=<%=request("dustbin")%>"><font size=4>һҳ</font></A>
<%
                           End If  
                       End If          
%>
                 </td></tr>
            </table>
            <table border="0"  align="left">
                 <tr><td>
                        <FONT face=webdings size=2>
                        <%if Page=1 then%>
                                <span style="color: #FF0000">9</span>
                        <%else%>
                                <a class=a2 href="index.asp?Page=1<%="&keyword="&keyword2&"&jinghua="&request("jinghua")&"&lockarticle="&request("lockarticle")&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")%>">9</a>
                        <%end if%>
                        <%if Page>10 then%>
                                <a class=a2 href="index.asp?Page=<%=currid1-1&"&keyword="&keyword2&"&jinghua="&request("jinghua")&"&lockarticle="&request("lockarticle")&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")%>">7</a>
                        <%end if%>
                        </FONT>
                        <strong>
<%
                        for i=currid2 to currid1
                             if Page=i then 
	                                response.Write("<font color=red size=4>"&i&"</font>  ")
                             else
%>
                                    <FONT size=2>
                                     <a class=a2 href="index.asp?Page=<%=i&"&keyword="&keyword2&"&jinghua="&request("jinghua")&"&lockarticle="&request("lockarticle")&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")%>">
                                    <%response.write i%>
                                    </a></FONT>
                             <%end if%>
                             <%response.write " "%>
                      <%next%>
                      </strong>
                      <FONT face=webdings size=2>
                      <%if currid1<totalPage then%>
                              <a class=a2 href="index.asp?Page=<%=currid1+1&"&keyword="&keyword2&"&jinghua=="&request("jinghua")&"&lockarticle="&request("lockarticle")&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")%>">8</a>
                      <%end if%>
                      </FONT> 
                      <FONT face=webdings size=2>
                      <%if Page=totalPage then%>
                             <span style="color: #FF0000">:</span>
                      <%else%>
                             <a class=a2 href="index.asp?Page=<%=totalPage&"&keyword="&keyword2&"&jinghua="&request("jinghua")&"&lockarticle="&request("lockarticle")&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")%>">:</a>
                      <%end if%>
                      </FONT>
                </td></tr>
            </table>
            <table align=left>
               <tr><td>
<% 
                    if totalPage>1 Then
                         If page=1 or totalPage>Page Then
                               dim NextPage
                               NextPage=Page+1
%>
                               <A class=a1 HREF="index.asp?Page=<%=NextPage%>&keyword=<%=keyword2%>&jinghua=<%=request("jinghua")%>&lockarticle=<%=request("lockarticle")%>&secret=<%=request("secret")%>&transmit=<%=request("transmit")%>&sel1=<%=request("sel1")%>&dustbin=<%=request("dustbin")%>"><font size=4>һҳ</font></A>
<%
                         End If
                     End If          
%>
               </td></tr>
            </table>
            <table align=right>
               <tr><td>
<%
                      if Page>totalPage then
                           Page=totalPage
                      end if
                      Response.Write "<font size=2>ҳΣ<font color= red><b>"& Page &"</b></font>/<b>"& totalPage &"</b>ҳ ,<b>"& totalRecordcount&"</b></font>"
                      Response.Write "&nbsp;&nbsp;&nbsp;&nbsp;"
 %>
               </td></tr>
           </table>
      <%end if%>
<%end sub%>

<%

sub ArticleListField()
     dim keyword2
     keyword2=trim(request("keyword"))
     Response.Write "<td class='titleBottomBorder' width='3%' align='left' valign='baseline'>"
     if request("page")<>"" Then
            Response.Write "<a class=a2 href=11.asp?id=" & objRS("id") & "&page=" &request("page")& "&jinghua=" &request("jinghua")& "&lockarticle=" &request("lockarticle")& "&keyword=" &replaceChr32(keyword2)&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")&"&indexpage=yes target='_blank'>"
     else
            Response.Write "<a class=a2 href=11.asp?id=" & objRS("id") & "&jinghua=" &request("jinghua")& "&lockarticle=" &request("lockarticle")& "&keyword=" &replaceChr32(keyword2)&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")&"&indexpage=yes target='_blank'>"
     end If
     if objrs("adminindex")=true then 
            response.Write"<img src='images/top1.gif' alt='̶ܹӣ԰顼 "&boardname(objRS("boardid"))&" ' border=0>&nbsp;"
     elseif objrs("topfirst")=true then 
            response.Write"<img src='images/top2.gif' alt='̶ӣ԰顼 "&boardname(objRS("boardid"))&" ' border=0>&nbsp;"
     elseif objrs("top1")=true then 
            response.Write"<img src='images/top3.gif' alt='̶' border=0>&nbsp;"
     elseif objrs("top_temp")=true then 
            response.Write"<img src='images/top4.gif' alt='ʱ̶' border=0>&nbsp;"
     elseif objrs("jinghua") then 
            response.Write"<img src='images/jh.gif' alt='' border=0>&nbsp;"
     elseif objrs("board_bulletin") then 
            response.Write"<img src='images/star.GIF' alt='ͷʾ' border=0>&nbsp;"
     elseif objrs("lockarticle") Then
                  response.Write"<img src='images/lock.gif' alt='' border=0>&nbsp;"
     elseif objrs("transmit") Then
         If (session("tslt_useridentity")=1 Or session("tslt_useridentity")=2) Then
            response.Write"<img src='images/transmit.gif' alt='ת' border=0>&nbsp;"
		 Else
            response.Write"<img src='images/tiezi.gif' alt='´' border=0>&nbsp;"
		 End If 
     elseif objrs("dustbin") Then
            response.Write"<img src='images/dustbin.gif' alt='' border=0>&nbsp;"
     else
            response.Write"<img src='images/tiezi.gif' alt='´' border=0>&nbsp;"
     end if
     Response.Write"</a>"
     Response.Write "</td>"
     Response.Write "<td class='titleBottomBorder' width='1%' align='left' valign='baseline'>"
            if replyList2(objRS("id")) then
                  if objRS("adminindex")=true or objRS("topfirst")=true then
                        Response.Write "<img src='images/plus.gif' alt='ظ'  id='Tag"& objRS("id") &RS("boardid")&"' style='cursor:hand;' onclick='javascript:turnit(Reply"& objRS("id") &RS("boardid")&" ,Tag"& objRS("id") &RS("boardid")&");showReplyPage("&objRS("id")&","&objRS("AllReplySize")&","&objRS("id")&RS("boardid")&");'>"
                  else
                         Response.Write "<img src='images/plus.gif' alt='ظ'  id='Tag"& objRS("id") &"' style='cursor:hand;' onclick='javascript:turnit(Reply"& objRS("id") &" ,Tag"& objRS("id") &");showReplyPage("&objRS("id")&","&objRS("AllReplySize")&","&objRS("id")&");'>"
                  end if
            else
                   if objRS("adminindex")=true or objRS("topfirst")=true then
                         Response.Write "<img src='images/minus.gif' alt='޻ظ'  id='Tag"& objRS("id") &RS("boardid")&"' style='cursor:hand;' onclick='javascript:turnit(Reply"& objRS("id") &RS("boardid")&" ,Tag"& objRS("id") &RS("boardid")&");showReplyPage("&objRS("id")&","&objRS("AllReplySize")&","&objRS("id")&RS("boardid")&");'>"
                   else
                          Response.Write "<img src='images/minus.gif' alt='޻ظ'  id='Tag"& objRS("id") &"' style='cursor:hand;' onclick='javascript:turnit(Reply"& objRS("id") &" ,Tag"& objRS("id") &");showReplyPage("&objRS("id")&","&objRS("AllReplySize")&","&objRS("id")&");'>"
                   end if
            end if
     Response.Write "</td>"
     Response.Write "<td class='titleBottomBorder' align='left'>"
     if request("page")<>"" Then
			Response.Write "&nbsp;<a class=a2 href=11.asp?id=" & objRS("id") & "&page=" &request("page")& "&jinghua=" &request("jinghua")& "&lockarticle=" &request("lockarticle")& "&keyword=" &request("keyword")&"&secret="&replaceChr32(keyword2)&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")&"&indexpage=yes title='"& objRS("subject") &"&#13;&#10;"&objRS("firstAddTime")&"'><font size=4><b>"
     else
            Response.Write "&nbsp;<a class=a2 href=11.asp?id=" & objRS("id") & "&jinghua=" &request("jinghua")& "&lockarticle=" &request("lockarticle")& "&keyword=" &replaceChr32(keyword2)&"&secret="&request("secret")&"&transmit="&request("transmit")&"&sel1="&request("sel1")&"&dustbin="&request("dustbin")&"&indexpage=yes title='"& objRS("subject") &"&#13;&#10;"&objRS("firstAddTime")&"'><font size=4><b>"
     end if
     if objrs("secret") then response.write"<font color='#bbbbbb'>" 
     if len(objrs("subject"))>17 then
            response.write (left(objrs("subject"),17))&"..." 
     else 
            response.write objrs("subject")&""
     end if 
     Response.Write"</b></font></a>"
     Response.Write "</td>"
     Response.Write "<td class='titleBottomBorder' align='right'><span class=fontsize>"
     if objrs("user")<>"" then
            call UserInfoLink(objrs("user"))
     else 
            Response.Write "(ο)"
     end if
     Response.Write "</span>"
     Response.Write "</td>"
     Response.Write "<td class='titleBottomBorder' align='right'><span class=fontsize>" &objrs("contentsize2")& "/" &FileContentSize2(objRS("AllReplySize"))& "</span></td>"
     Response.Write "<td class='titleBottomBorder' align='center'><span class=fontsize>"&objRS("AllReplyCount")& "/" &objRS("ReadCount")&"</span></td>"
	 if NewRH(objrs("ID"))<>"" then
            Response.Write "<td class='titleBottomBorder' align='left'><span class=fontsize>" &objrs("lastReplyTime")&"<a title=' "&NewRH(objrs("ID"))&" '>" &(left(NewRH(objrs("ID")),6))&"</a></span></td>"
     else
            Response.Write "<td class='titleBottomBorder' align='left'><span class=fontsize>" &objrs("lastReplyTime")   
            if replyList2(objRS("id"))=true then    
                   Response.Write "(ο)"
            end if
            Response.Write "</span></td>"
     end if
     if (session("tslt_useridentity")=1 or session("tslt_useridentity")=2) then
            Response.Write "<td class='titleBottomBorder' align='center'><input type='checkbox' value='on' name="&objrs("id")&" id='client_Id'></td>"
     end if
     Response.Write "</TR>"
     if objRS("adminindex")=true or objRS("topfirst")=true then
             Response.Write "<TR>"
             Response.Write "<td colspan=8 id='Reply"& objRS("id") &RS("boardid")&"' style='DISPLAY: none'>>" 
             Response.Write "<b>ȡС</b>"
             Response.Write "</td>"
             Response.Write "</TR>"
     else
             Response.Write "<TR>"
             Response.Write "<td colspan=8 id='Reply"& objRS("id") &"' style='DISPLAY: none'>"
             Response.Write "<b>ȡС</b>"
             Response.Write "</td>"
             Response.Write "</TR>"
     end If
     Response.Write "<TR height='6' bgcolor='#fffff8'><td></td></TR>"
end sub

%>

